package net.sisgac.despacho_mercaderia.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the detalle_orden database table.
 * 
 */
@Embeddable
public class DetalleOrdenPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="IDORDENSERVICIO")
	private int idordenservicio;

	@Column(name="IDMERCADERIA")
	private int idmercaderia;

    public DetalleOrdenPK() {
    }
	public int getIdordenservicio() {
		return this.idordenservicio;
	}
	public void setIdordenservicio(int idordenservicio) {
		this.idordenservicio = idordenservicio;
	}
	public int getIdmercaderia() {
		return this.idmercaderia;
	}
	public void setIdmercaderia(int idmercaderia) {
		this.idmercaderia = idmercaderia;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof DetalleOrdenPK)) {
			return false;
		}
		DetalleOrdenPK castOther = (DetalleOrdenPK)other;
		return 
			(this.idordenservicio == castOther.idordenservicio)
			&& (this.idmercaderia == castOther.idmercaderia);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idordenservicio;
		hash = hash * prime + this.idmercaderia;
		
		return hash;
    }
}